package com.fosun.spr.plugin.dict.api.control;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.fosun.spr.plugin.dict.api.service.DictService;
import com.fosun.spr.plugin.dict.api.service.model.ListDictValueSpModel;
import com.fosun.spr.plugin.dict.api.service.model.ListDictValueSrModel;
import com.fosun.spr.core.base.CoBaseControl;

@RestController
public class DictControl extends CoBaseControl {
	@Resource
	private DictService dictService;

	/**
	 * http://127.0.0.1:8080/mq_meet_server/api/dict/listDictValue
	 * http://127.0.0.1:8081/api/core/dict/listDictValue
	 * 
	 * @param request
	 * @param spModel
	 * @return
	 */	
	@RequestMapping(value = "/api/core/dict/listDictValue",method = RequestMethod.GET)
	public ListDictValueSrModel listDictValue(HttpServletRequest request, ListDictValueSpModel spModel) {
		//SessionUtils.fillSpModel(request, spModel);
		ListDictValueSrModel srModel = dictService.listDictValue(spModel);
		return srModel;
	}
	
 
}
